//
//  HMCarousel.h
//  HMDemo
//
//  Created by mengxiangyu on 2017/7/12.
//  Copyright © 2017年 mengxiangyu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HMScrollViewItem.h"
#import "HMCollectionViewItem.h"
@class HMCarouselScrollView;

@protocol HMCarouselDelegate <NSObject>

- (void)setContentView:(HMScrollViewItem *)view index:(NSInteger)index; // 无限轮播代理方法
- (void)setItemView:(HMCollectionViewItem *)view index:(NSInteger)index; // 有限轮播代理方法
- (void)touchCarouselIndex:(NSInteger)index; // 点击轮播图方法
- (void)scrollToIndex:(NSInteger)index; // 滚动到的页面的索引

@end

@interface HMCarousel : UIView
@property (strong, nonatomic) HMCarouselScrollView *scrollRed;
@property (strong, nonatomic) HMCarouselScrollView *scrollBlue;
@property (strong, nonatomic) HMCarouselScrollView *currScrollView;
@property (assign, nonatomic) id<HMCarouselDelegate> delegate;
@property (assign, nonatomic) NSInteger carouselCount;
/**
 
 carouselRect:轮播视图区域
 carouselCount:轮播数量
 repeat:是否无限轮播 YES 是，NO 否
 
 */
- (void)showCarouselRect:(CGRect)carouselRect carouselCount:(NSInteger)carouselCount target:(id)target repeat:(BOOL)repeat;


@end
